package schoolbolg_gh326.fragment;

import schoolbolg_gh326.Activity.CollectionActivity;
import schoolbolg_gh326.Activity.CommentActivity;
import schoolbolg_gh326.Activity.FileActivity;
import schoolbolg_gh326.Activity.FollowActivity;
import schoolbolg_gh326.Activity.ShezhiActivity;
import schoolbolg_gh326.Activity.ViewActivity;
import android.R.raw;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.example.schoolbolg_gh326.R;


public class PersonFragment extends Fragment {
	

	public PersonFragment() {
		// Required empty public constructor
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// Inflate the layout for this fragment
		View view = inflater.inflate(R.layout.fragment_person, container,false);
		
		LinearLayout sz = (LinearLayout) view.findViewById(R.id.shezhi);
		sz.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(getActivity(),ShezhiActivity.class);
				getActivity().startActivity(intent);
			}
		});
		LinearLayout gz = (LinearLayout) view.findViewById(R.id.guanzhu);
		gz.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(getActivity(),FollowActivity.class);
				getActivity().startActivity(intent);
			}
		});
	/*	LinearLayout sc = (LinearLayout) view.findViewById(R.id.shoucang);
		sc.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(getActivity(),CollectionActivity.class);
				getActivity().startActivity(intent);
			}
		});*/
		/*LinearLayout pl = (LinearLayout) view.findViewById(R.id.pinglun);
		pl.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent (getActivity(),CommentActivity.class);
				getActivity().startActivity(intent);
			}
		});*/
		/*LinearLayout wj = (LinearLayout) view.findViewById(R.id.wenjian);
		wj.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent (getActivity(),FileActivity.class);
				getActivity().startActivity(intent);
			}
		});*/
		LinearLayout yj = (LinearLayout) view.findViewById(R.id.yijian);
		yj.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent (getActivity(),ViewActivity.class);
				getActivity().startActivity(intent);
			}
		});
		
		return view;
	}

	// TODO: Rename method, update argument and hook method into UI event
	public void onButtonPressed(Uri uri) {
		
	}


	@Override
	public void onDetach() {
		super.onDetach();
		
	}

	/**
	 * This interface must be implemented by activities that contain this
	 * fragment to allow an interaction in this fragment to be communicated to
	 * the activity and potentially other fragments contained in that activity.
	 * <p>
	 * See the Android Training lesson <a href=
	 * "http://developer.android.com/training/basics/fragments/communicating.html"
	 * >Communicating with Other Fragments</a> for more information.
	 */
	public interface OnFragmentInteractionListener {
		// TODO: Update argument type and name
		public void onFragmentInteraction(Uri uri);
	}

}
